<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
// 禁止手机端扩大和缩小手势
window.onload = function () {
  document.addEventListener("touchstart", function (event) {
    if (event.touches.length > 1) {
      event.preventDefault();
    }
  });
  // gesturestart:当有两根或多根手指放到屏幕上的时候触发
  document.addEventListener("gesturestart", function (event) {
    console.log("gesturestart事件触发");
    event.preventDefault();
  });
};
</script>

<style>
#app {
  width: 100%;
  height: 100%;
}

/** 解决 [Intervention] Unable to preventDefault 
inside passive event listener due to target being treated as
**/
* {
  touch-action: pan-y;
}
</style>
